<?php
header('Access-Control-Allow-Origin:*'); // *代表允许任何网址请求
// include('conn.php');
$servername = "aiyoyo";
$serusername = "aiyoyo";
$password = "xiaotaiyang123";
$dbname='aiyoyo';
// 创建连接
$conn = new mysqli($servername, $serusername, $password,$dbname);
// 检测连接
if ($conn->connect_error) {
    die("连接失败: " . $conn->connect_error);
}
echo "连接成功";

$username = $_POST["username"];
$password = $_POST["password"];
echo $username;
echo $password;
$que = "SELECT * FROM amin WHERE admin='$username' and password='$password'";
$sql = mysqli_query($conn,$que);
if($row = mysqli_fetch_array($sql)){
    echo json_encode('ok');
} 
echo '返回'

?>